Can I include a view in Kohana 3 that is not within `application/views`?

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-06-08T05:54:50Z Indexed on 2010/06/08 6:02 UTC
Read the original article Hit count: 143

Filed under:
|
|
|

I am building a staff area for a website, which is completely different to the main brochure style site.

I have 2 Kohana systems setup. I realise they can both share the same system and modules folder.

Now, with the second one, I want to make the main template view a view in a different folder.

I tried this in my base controller

$this->template = DOCROOT . '../~new2/application/views/template.php';

But Kohana is looking for it in its own views folder as evident by the error I received. I even put a var_dump(file_exists($this->template)); // true to be sure it was finding the correct file.

Is there a way to add a template file that is not within the views folder, without hacking the core Kohana code (and if I'm lucky not extending and overloading the view class).

© Stack Overflow or respective owner

Related posts about php

Related posts about view